"bazelndf dependencies"

module(
    name = "bazeldnf",
    version = "v0.0.0",
    bazel_compatibility = [">=7.0.0"],
    compatibility_level = 0,
)

bazeldnf_toolchain = use_extension("//bazeldnf:extensions.bzl", "bazeldnf_toolchain")
bazeldnf_toolchain.register()
use_repo(
    bazeldnf_toolchain,
    "bazeldnf_toolchains",
)

register_toolchains("@bazeldnf_toolchains//:all")

# bazeldnf starlark dependenies
bazel_dep(name = "bazel_skylib", version = "1.7.1")
bazel_dep(name = "platforms", version = "0.0.11")
bazel_dep(name = "bazel_features", version = "1.26.0")

# if someone wants to build the bazeldnf toolchain from sources needs this set of dependencies
bazel_dep(name = "gazelle", version = "0.42.0")
bazel_dep(name = "rules_go", version = "0.53.0")

go_sdk = use_extension("@rules_go//go:extensions.bzl", "go_sdk", dev_dependency = True)
go_sdk.download(version = "1.24.1")

go_deps = use_extension("@gazelle//:extensions.bzl", "go_deps")
go_deps.from_file(go_mod = "//:go.mod")
use_repo(
    go_deps,
    "com_github_adrg_xdg",
    "com_github_bazelbuild_buildtools",
    "com_github_crillab_gophersat",
    "com_github_jdx_go_netrc",
    "com_github_klauspost_compress",
    "com_github_onsi_gomega",
    "com_github_sassoftware_go_rpmutils",
    "com_github_sirupsen_logrus",
    "com_github_spf13_cobra",
    "io_k8s_sigs_yaml",
    "org_golang_x_crypto",
    "org_golang_x_exp",
)

# DEV DEPENDENCIES
bazeldnf_dev = use_extension("//bazeldnf:extensions.bzl", "bazeldnf", dev_dependency = True)
bazeldnf_dev.rpm(
    name = "bazeldnf_internal_abseil-cpp-devel",
    sha256 = "1393c28f5a3f3029769bbe3436b3eec58c7b11761c4ad6695c309b21474d9804",
    urls = [
        "https://kojipkgs.fedoraproject.org//packages/abseil-cpp/20240722.1/1.fc42/x86_64/abseil-cpp-devel-20240722.1-1.fc42.x86_64.rpm",
    ],
)
bazeldnf_dev.rpm(
    name = "bazeldnf_internal_libvirt-devel",
    sha256 = "dba37bbe57903afe49b5666f1781eb50001baa81af4584b355db0b6a2afad9fa",
    urls = [
        "https://kojipkgs.fedoraproject.org//packages/libvirt/11.0.0/1.fc42/x86_64/libvirt-devel-11.0.0-1.fc42.x86_64.rpm",
    ],
)
bazeldnf_dev.rpm(
    name = "bazeldnf_internal_libvirt-libs",
    sha256 = "aac272a2ace134b5ef60a41e6624deb24331e79c76699ef6cef0dca22d94ac7e",
    urls = [
        "https://kojipkgs.fedoraproject.org//packages/libvirt/11.0.0/1.fc42/x86_64/libvirt-libs-11.0.0-1.fc42.x86_64.rpm",
    ],
)
use_repo(
    bazeldnf_dev,
    "bazeldnf_internal_abseil-cpp-devel",
    "bazeldnf_internal_libvirt-devel",
    "bazeldnf_internal_libvirt-libs",
)

bazel_dep(name = "protobuf", version = "30.1", dev_dependency = True)
bazel_dep(name = "toolchains_protoc", version = "0.3.7", dev_dependency = True)

protoc = use_extension("@toolchains_protoc//protoc:extensions.bzl", "protoc", dev_dependency = True)
use_repo(protoc, "toolchains_protoc_hub")

# deps only needed for the repo internals
bazel_dep(name = "bazel_skylib_gazelle_plugin", version = "1.7.1", dev_dependency = True)
bazel_dep(name = "aspect_bazel_lib", version = "2.14.0", dev_dependency = True)
bazel_dep(name = "buildifier_prebuilt", version = "8.0.1", dev_dependency = True)
bazel_dep(name = "rules_pkg", version = "1.1.0", dev_dependency = True)
bazel_dep(name = "stardoc", version = "0.8.0", dev_dependency = True)
bazel_dep(name = "rules_proto", version = "7.1.0", dev_dependency = True)
bazel_dep(name = "rules_java", version = "8.11.0", dev_dependency = True)

protobuf_java = use_extension("//bazeldnf:extensions.bzl", "protobuf_java", dev_dependency = True)
use_repo(protobuf_java, "protobuf-java")

register_toolchains(
    "//tools/toolchains:all",
    dev_dependency = True,
)

register_toolchains(
    "@toolchains_protoc_hub//:all",
    dev_dependency = True,
)

bazel_dep(name = "rules_cc", version = "0.1.1", dev_dependency = True)
